<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
		window.onload= function () {
			a = document.getElementsByTagName('a');


			for (var i = 0; i <a.length; i++) {
				a[i].onclick = function () {
					this.parentNode.parentNode.style.display="none";
				}
			}
		}
	</script>
</head>
<body>
	<table border="1">
		<tr>
			<td>姓名</td>
			<td>年龄</td>
			<td>操作</td>
		</tr>
		<tr>
			<td>小明</td>
			<td>18</td>
			<td><a href="javascritp:;">删除</a></td>
		</tr>
		<tr>
			<td>小林</td>
			<td>28</td>
			<td><a href="javascritp:;">删除</a></td>
		</tr>
		<tr>
			<td>小森</td>
			<td>48</td>
			<td><a href="javascritp:;">删除</a></td>
		</tr>
		<tr>
			<td>小花</td>
			<td>23</td>
			<td><a href="javascritp:;">删除</a></td>
		</tr>
	</table>
</body>
</html>